﻿CREATE TABLE [dbo].[ChitantaDetaliu] (
    [IdChitantaDetaliu] INT             IDENTITY (1, 1) NOT NULL,
    [IdChitanta]        INT             NOT NULL,
    [IdActMedical]      INT             NOT NULL,
    [Cantitate]         DECIMAL (18, 2) NOT NULL,
    [ValoareUnitara]    DECIMAL (18, 2) NOT NULL,
    [Valoare]           DECIMAL (18)    NOT NULL,
    CONSTRAINT [PK_ChitantaDetaliu] PRIMARY KEY CLUSTERED ([IdChitantaDetaliu] ASC),
    CONSTRAINT [FK_ChitantaDetaliu_ActeMedicale] FOREIGN KEY ([IdActMedical]) REFERENCES [dbo].[ActeMedicale] ([IdActMedical]),
    CONSTRAINT [FK_ChitantaDetaliu_Chitanta] FOREIGN KEY ([IdChitanta]) REFERENCES [dbo].[Chitanta] ([IDChitanta])
);

